package com.haixiaoke.saas.repository.service;

import com.haixiaoke.saas.repository.pojo.BusinessCircle;
import com.haixiaoke.saas.repository.util.Tree.Node;

import java.math.BigDecimal;
import java.util.List;

/**
 * 商业区Service接口
 *
 * @author haixiaoke
 * @date 2023-04-06
 */
public interface IBusinessCircleService {
    /**
     * 查询商业区
     *
     * @param businessCircleidId 商业区主键
     * @return 商业区
     */
    public BusinessCircle selectBusinessCircleByBusinessCircleId(Long businessCircleId);

    /**
     * 查询商业区列表
     *
     * @param businessCircle 商业区
     * @return 商业区集合
     */
    List<BusinessCircle> selectBusinessCircleList(BusinessCircle businessCircle);

    /**
     * 新增商业区
     *
     * @param businessCircle 商业区
     * @return 结果
     */
    public int insertBusinessCircle(BusinessCircle businessCircle);

    /**
     * 修改商业区
     *
     * @param businessCircle 商业区
     * @return 结果
     */
    int updateBusinessCircle(BusinessCircle businessCircle);

    /**
     * 批量删除商业区
     *
     * @param businessCircleIds 需要删除的商业区主键集合
     * @return 结果
     */
    int deleteBusinessCircleByBusinessCircleIds(Long[] businessCircleIds);

    /**
     * 删除商业区信息
     *
     * @param businessCircleId 商业区主键
     * @return 结果
     */
    int deleteBusinessCircleByBusinessCircleId(Long businessCircleId);

    /**
     * 校验是否有重复的经纬度组合
     * @param longitude  经度
     * @param latitude   纬度
     * @return
     */
    boolean checkLongitudeAndLatitude(BigDecimal longitude, BigDecimal latitude);

    List<BusinessCircle> selectBusinessCircleByBusinessCircleIdIn(List<Long> businessCircleIdList);

    /**
     * 查询商区全名
     *
     * @param businessCircleIdList 商业区主键s
     * @return
     */
    String selectBusinessCircleFullNamesByIdIn(List<Long> businessCircleIdList);

    List<Node> selectComboListByCityId(Long cityId);
}
